package com.jic.order.enums;

public enum SaleChannelEnum {

    BBC(1, "BBC"),
    TIAN_MAO(2, "天猫"),
    JI_DONG(3, "京东");

    private Integer code;

    private String message;

    SaleChannelEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static SaleChannelEnum getByCode(Integer code){
        SaleChannelEnum[] values = SaleChannelEnum.values();
        for(SaleChannelEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
